package com.mapforge.listener;

import java.util.Iterator;
import java.util.Set;

import com.mapforge.map.TileLayer;

public class TileLayerSelectionEvent extends BasicEvent {
	private Set<TileLayer> selectedLayers;

	/**
	 * 
	 * @param src
	 * @param selectedLayer
	 */
	public TileLayerSelectionEvent(Object src, Set<TileLayer> selectedLayers) {
		super(src);
		this.selectedLayers = selectedLayers;
	}

	/**
	 * 
	 * @return
	 */
	public Iterator<TileLayer> iterator() {
		return this.selectedLayers.iterator();
	}

	public int getNumberLayersSelected() {
		return this.selectedLayers.size();
	}
}
